﻿<%@ Page Title="Página Inicial" Language="C#" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Src="Controles/uctLogin.ascx" TagName="uctLogin" TagPrefix="cc1" %>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentCenter" runat="Server">
    <div>
        <div>
            <p>
                <h2>
                    Reclamações mais recetemente adicionadas</h2>
            </p>
        </div>
        <asp:GridView ID="grvTopReclamacoes" runat="server" AlternatingRowStyle-CssClass="grid-reclamacoes-alt-item"
            HeaderStyle-CssClass="grid-reclamacoes-header" RowStyle-CssClass="grid-reclamacoes-item"
            CssClass="grid-reclamacoes" AutoGenerateColumns="False" OnRowDataBound="grvTopReclamacoes_RowDataBound" Width="100%">
            <RowStyle CssClass="grid-reclamacoes-item"></RowStyle>
            <Columns>
                <asp:BoundField DataField="rec_id_reclamacao" />
                <asp:BoundField DataField="rec_ds_reclamacao" HeaderText="Descrição" />
                <asp:BoundField DataField="rec_dt_data" HeaderText="Data " />
                <asp:TemplateField HeaderText="Usuário">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("usr_usuario.usr_ds_nickname") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("usr_usuario.usr_ds_nickname") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Status
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblStatusReclamacao" runat="server" Text='<%#Bind("rec_id_status") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Álbum
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="hplUrlImagem" runat="server" Text="Visualizar" ImageUrl="~/App_Themes/SomTheme/imagens/flickr.png"
                            NavigateUrl='<%#Eval("img_imagem.img_ds_url") %>' ToolTip='<%#Eval("img_imagem.img_ds_url") %>'
                            Target="_blank" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Vídeo
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="hplUrlVideo" runat="server" Text="Visualizar" ImageUrl="~/App_Themes/SomTheme/imagens/youtube.png"
                            NavigateUrl='<%#Eval("vdo_video.vdo_ds_url") %>' ToolTip='<%#Eval("vdo_video.vdo_ds_url") %>'
                            Target="_blank" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Localização
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="hplVerMapa" runat="server" Text="Ver no mapa" ImageUrl="~/App_Themes/SomTheme/imagens/map.png"
                            ToolTip='<%# Eval("loc_localizacao.loc_ds_latitude") + ";" + Eval("loc_localizacao.loc_ds_longitude") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HyperLink ID="hypVisualizarReclamacao" runat="server" ImageUrl="~/App_Themes/SomTheme/imagens/lupa.png"
                            ToolTip="Visualizar" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                Nenhuma reclamação recente adicionada.</EmptyDataTemplate>
            <HeaderStyle CssClass="grid-reclamacoes-header"></HeaderStyle>
            <AlternatingRowStyle CssClass="grid-reclamacoes-alt-item"></AlternatingRowStyle>
        </asp:GridView>
    </div>
    <br class="spacer" />
    <hr />
    <div id="nuvemTags">
        <asp:Panel ID="frmRight" runat="server">
            <asp:DataList ID="dtlTopTags" runat="server" OnItemDataBound="dtlTopTags_ItemDataBound"
                RepeatDirection="Horizontal" RepeatLayout="Flow">
                <ItemTemplate>
                    <%#Eval("tag_ds_tag") %>
                    &nbsp;
                </ItemTemplate>
            </asp:DataList>
        </asp:Panel>
    </div>
</asp:Content>
